<%--
  Created by IntelliJ IDEA.
  User: onion
  Date: 2018/7/18
  Time: 0:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>erro</title>
    <link rel="icon" href="image/ico-color.png">
    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css">
    <style>
        .text-center {
            background-color: #f5f5f5
        }
        .panel {
            margin-top: 20%;
        }

        /* 错误页面 */
        #error a:hover
        {
            text-decoration: underline;
            cursor: pointer;
        }

        .error_page {
            background-image: url(image/error.jpg);
            background-repeat: no-repeat;
            background-position: center top;
        }
    </style>
    <script>
        var age = 100;
    </script>
    <script language="javascript" type="text/javascript">
        var timer;
        //启动跳转的定时器
        function startTimes() {
            timer = window.setInterval(showSecondes,1000);
        }

        var i = 5;
        function showSecondes() {
            if (i > 0) {
                i--;
                document.getElementById("secondes").innerHTML = i;
            }
            else {
                window.clearInterval(timer);
                location.href = "/login.html";
            }
        }

        //取消跳转
        function resetTimer() {
            if (timer != null && timer != undefined) {
                window.clearInterval(timer);
                location.href = "login.html";
            }
        }
    </script>
</head>
<body class="text-center error_page" onload="startTimes();">
    <div class="panel">
        <h1 class="h3 mb-3 font-weight-normal">哦噢，你访问的页面出异常了</h1>
        <h3 id="error">
            遇到错误，&nbsp;<span id="secondes">5</span>&nbsp;秒后将自动跳转，立即跳转请点击&nbsp;
            <a href="login.html" href="javascript:resetTimer();">返回</a>
        </h3>
    </div>
</body>
</html>
